# -*- coding: utf-8 -*-
# @Author  : Bink
# @Email   : 2641032316@qq.com
# @Time    : 2020/9/7 16:05
# @File    : 作业3.py

print('1到100以内的6的倍数的和: %d' % sum(filter(lambda x: x % 6 == 0, range(1, 101))))


sum1 = 0
idx = 0
for i in range(1, 101):
    if sum1 > 166:
        break
    if i % 6 == 0:
        sum1 += i
        idx = i
print(f'刚好超过166时：\n和为：{sum1}\t数：{idx}')






